<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="css/oacss.css" rel="stylesheet" type="text/css" />
<STYLE type="text/css">
#scrollImg{overflow:hidden;width:300px;height:auto;border:0px solid #000000;float:left;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
</STYLE>
<script type="text/javascript">
function show(){
var date = new Date(); //日期对象
var day=date.getDay();
var arr_week= new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
var now = "";
now = date.getFullYear()+"年"; //读英文就行了
now = now + (date.getMonth()+1)+"月"; //取月的时候取的是当前月-1如果想取当前月+1就可以了
now = now + date.getDate()+"日&nbsp;&nbsp;";
now += arr_week[day];
document.getElementById("nowDiv").innerHTML = now; //div的html是now这个字符串 
setTimeout("show()",1000); //设置过1000毫秒就是1秒，调用show方法
}

//滚动信息提示
function message(){
	 var leftspeed = 40;//滚动速度，数值越大，滚动越慢
      document.getElementById("scrollImg2").innerHTML = document.getElementById("scrollImg1").innerHTML;
      function MarqueeLeft(){
      if(document.getElementById("scrollImg2").offsetWidth-document.getElementById("scrollImg").scrollLeft<=0)
      document.getElementById("scrollImg").scrollLeft-=document.getElementById("scrollImg1").offsetWidth
      else{
      document.getElementById("scrollImg").scrollLeft++
      }}
      var MyMarleft = setInterval(MarqueeLeft, leftspeed)
      document.getElementById("scrollImg").onmouseover=function() {clearInterval(MyMarleft)}
      document.getElementById("scrollImg").onmouseout=function() {MyMarleft=setInterval(MarqueeLeft,leftspeed)}
	}

window.onload=function(){
	show();
	message();
}

function reLogin(){
	if(confirm("确定重新登录？")){
	  window.location.href="loginOut.action";
	}
}
function loginOut(){
	if(confirm("确定要退出？")){
	  window.parent.close();
	}
}
</script>

</head>

<body>
<div style="background:url(image/newsTip.jpg);width:100%;height:20px;position:relative;">
<!-- 用户名和时间 -->
	<div style="padding-top:4px;padding-left:30px;">
    	<font class="topFontColor">${sessionScope.userInfo.name}您好，今天是</font><font class="topFontColor" id="nowDiv"></font>
    </div>

<!-- 信息提示 -->
<div id="scrollImg" style="position:absolute;bottom:0px;margin-left:400px";>
    	<table cellspacing="0px" cellpadding="0px" align="left" border="0px">
        	<tbody>
            	<tr>
                	<td id="scrollImg1">
                		<table height="100%" width="300px" border="0" cellpadding="0" cellspacing="0">
                    		<tbody>
                        		<tr>
                                	<td>
                                    <font class="topFontColor">有</font>
                                    &nbsp;&nbsp;
                                    <a href="#"><font color="#FF0000">14</font><font class="topFontColor">份新汇报</font></a>
                                    &nbsp;&nbsp;
                                    <a href="#"><font color="#FF0000">104</font><font class="topFontColor">份新待批文件</font></a>
                                  </td>
                                </tr>
                        	</tbody>
                    	</table>
                	</td>
                    <td id="scrollImg2"></td>
                </tr>
            </tbody>
        </table>
    </div>
<!-- 在线人数 -->
    <div style="position:absolute; bottom:0px;right:10px;height:20px;">
    	<img vspace="asd" width="30px"  height="18px" alt="重新登录" onclick="reLogin();" src="image/ReLogin.jpg" />&nbsp;&nbsp;&nbsp;<img alt="退出" onclick="loginOut()" src="image/refresh.jpg" />
    </div>
</div>
</body>
</html>